import request from '@/utils/request'

// 查询货运单列表
export function listWaybill(query) {
  return request({
    url: '/accept/waybill/list',
    method: 'get',
    params: query
  })
}

// 查询货运单详细
export function getWaybill(waybillId) {
  return request({
    url: '/accept/waybill/' + waybillId,
    method: 'get'
  })
}

// 新增货运单
export function addWaybill(data) {
  return request({
    url: '/accept/waybill',
    method: 'post',
    data: data
  })
}

// 修改货运单
export function updateWaybill(data) {
  return request({
    url: '/accept/waybill',
    method: 'put',
    data: data
  })
}

// 删除货运单
export function delWaybill(waybillId) {
  return request({
    url: '/accept/waybill/' + waybillId,
    method: 'delete'
  })
}
